<?php

class Pages_admin_model extends Model
{
	function __construct()
	{
		parent::Model();
	}
	
	function Pages_admin_model()
	{
		self::__construct();
	}
	
	function list_pages()
	{
		$this->db->order_by('id', 'ASC');
		$query = $this->db->get('pages');
		return $query->result_array();
	}
	
	function get_page($id)
	{
		$this->db->where('id', $id);
		$query = $this->db->get('pages');
		
		return $query->row_array();
	}
	
	function get_route($link)
	{
		$this->db->limit('1');
		$this->db->where('fake_route', $link);
		$query = $this->db->get('routes');
		
		return $query->row_array();
	}

	function get_front_navigation($id)
	{
		$this->db->where('id', $id);
        $this->db->select('front_nav');
		$this->db->from('routes');
		$query2 = $this->db->get();
		return $query2->row_array();
	}

	function get_navigation_order($id)
	{
		$this->db->where('id', $id);
        $this->db->select('navigation_order');
		$this->db->from('routes');
		$query2 = $this->db->get();
		return $query2->row_array();
	}


} // user_admin_model()

/* End of file user_admin_model.php */
/* Location: modules/user/models/user_admin_model.php */